package com.punai.enterprisedatadisplay.controller;

import com.punai.common.core.controller.BaseController;
import com.punai.common.core.domain.AjaxResult;
import com.punai.enterprisedatadisplay.constanta.OvershootSituationConstanta;
import com.punai.enterprisedatadisplay.domain.vo.OvershootSituationVo;
import com.punai.enterprisedatadisplay.service.OvershootSituationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.ParseException;

@RestController
@RequestMapping("/enterpriseDataDisplay/overshootSituation")
public class OvershootSituationController extends BaseController {
    @Autowired
    private OvershootSituationService overshootSituationService;
    /**
     * 查询页签列表
     */
    @PreAuthorize("@ss.hasPermi('enterprisedatadisplay:overshootsituation:getTabs')")
    @GetMapping("/getTabs")
    public AjaxResult getTabs() {
        return AjaxResult.success(OvershootSituationConstanta.Tabs.getAllTab());
    }

    /**
     * 查询页签列表
     */
    @PreAuthorize("@ss.hasPermi('enterprisedatadisplay:overshootsituation:getTableData')")
    @GetMapping("/getTableData")
    public AjaxResult getTableData(OvershootSituationVo vo) throws ParseException {
        return AjaxResult.success(overshootSituationService.getTableData(vo));
    }


}
